<?php
$this->breadcrumbs=array(
	'Packages'=>array('index'),
	$data->name,
);

$this->menu=array(
	array('label'=>'List Package', 'url'=>array('index')),
	array('label'=>'Create Package', 'url'=>array('create')),
	array('label'=>'Update Package', 'url'=>array('update', 'id'=>$data->id)),
	array('label'=>'Delete Package', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$data->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Package', 'url'=>array('admin')),
);
//$a = $config->xpath('/package/da');
// echo $a[0];
// $a = $config->xpath('/package/gach');
// echo $a[0];

?>
<h1>View Package #<?php echo $data->id; ?></h1>

<div class="view">

	<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
	<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
	<br />

	<b><?php echo CHtml::encode($data->getAttributeLabel('name')); ?>:</b>
	<?php echo CHtml::encode($data->name); ?>
	<br />

	<b><?php echo CHtml::encode($data->getAttributeLabel('file')); ?>:</b>
	<?php echo CHtml::encode($data->file); ?>
	<br />

	<b><?php echo CHtml::encode($data->getAttributeLabel('desc')); ?>:</b>
	<?php echo CHtml::encode($data->desc); ?>
	<br />
        <?php foreach ($config->children() as $child) :
            $attr = $child->attributes();
            $category = Category::model()->findByPk($attr['id']);    
        ?>
            <b><?php echo $category->name; ?></b>  <?php echo $child ?>	<br /> 
        <?php endforeach; ?>


</div>